package single.instance;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;

public class SingleInstance extends JFrame {

	private JPanel contentPane;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		
		String property = System.getProperty("1234567");
		System.out.println(property);
	JOptionPane.showMessageDialog(null, property);
		
		System.setProperty("1234567", "value");
		
		property = System.getProperty("1234567");
		System.out.println(property);
		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					SingleInstance frame = new SingleInstance();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the frame.
	 */
	public SingleInstance() {
		System.setProperty("1234567", "value");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setTitle("Single Instance");
		contentPane = new JPanel();
		contentPane.setLayout(null);
		contentPane.setPreferredSize(new Dimension(200, 200));
		setContentPane(contentPane);
		pack();
	}

}
